<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="com.lmpop.trade.ts_area.*" %>
<jsp:useBean id="randomId" class="com.lmpop.frame.util.RandomID" scope="page" /> 
<html>
<%
	String area_id = randomId.GenTradeId();
	Ts_area ts_area = new Ts_area();
	Ts_areaInfo ts_areaInfo = new Ts_areaInfo();
	String cust_id="";	
	if( session.getAttribute("session_cust_id") != null )
	{
		cust_id = session.getAttribute("session_cust_id").toString();
	}
	String up_area_name="",up_area_id="";      
	if (request.getParameter("up_area_id") != null) {
		  up_area_id = request.getParameter("up_area_id");
		  up_area_name  =ts_areaInfo.getAreaNameById(up_area_id);		
	}else {
		up_area_id = "000000000000000";
	}	
%>	
  <head>
    <title>区域管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="area.js"></script>
</head>

<body>
	<%
	
	if(!up_area_name.equals("")){		
	%>
	<h1>新增下级区域</h1>
		
	<%
	}else{
	%>	
	<h1>新增区域</h1>
	<%
	}
	%>
	<form action="/doTradeReg.do" method="post" name="addForm">
	
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
	<input name="area_id" id="area_id" type="hidden" value="<%=area_id%>"/>
		<%
		
		if(!up_area_name.equals("")){		
		%>
		<tr>
			<td align="right" width="10%">
				上级区域:
			</td>
			<td><%=up_area_name%></td>
		</tr>
		
		<%
		}
		%>
		
		<tr>
			<td align="right" width="10%">
				区域名称<font color="red">*</font>
			</td>
			<td><input name="area_name" id="area_name" maxlength="100" type="text" /></td>
		</tr>		
	
		<input name="up_area_id" id="up_area_id" type="hidden" value="<%=up_area_id%>"/>
		
		
		<tr>
			<td align="right" width="10%">
				排序<font color="red">*</font>
			</td>
			<td><input name="sort_no" id="sort_no" type="text" value="" size="2" maxlength="2" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''"/></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="7430" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onClick="return checkInfo()"/>&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onClick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
